﻿using SeaBattle.Domain.Abstract;
using SeaBattle.Domain.Entities;
using SeaBattle.Domain.Abstract.Services;

namespace SeaBattle.Domain.Concrete
{
    public class FakePlayerRepository: IPlayerRepository
    {
        private IPlayerService playerService;

        public FakePlayerRepository(IPlayerService playerService)
        {
            this.playerService = playerService;
        }
        public Player CreateNewPlayer(string name, string login)
        {
            return new Player(name, login);
        }

        public void SavePlayer(Player player)
        {
            //var playerService = PlayerFactory.CreatePlayerService();
            playerService.RegisterNewPlayer(player);
        }
    }
}
